<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>AddPlanBasicInfo</title>
<link rel="stylesheet" type="text/css" href="../css/blueprint/screen.css" media="screen, projection"/>
<link type="text/css" href="../css/redmond/jquery-ui-1.7.custom.css" rel="stylesheet" />
<script type="text/javascript" src="../script/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="../script/jquery-ui-1.7.custom.min.js"></script>
<script type="text/javascript">
    $(document).ready(function() {

    	$(".date-text").datepicker( { dateFormat: 'yy-mm-dd', changeYear: true, changeMonth: true, dayNamesMin: ['日', '一', '二', '三', '四', '五', '六'], monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12']} );

        loadTempSavedData();

        $("#tempSave").click(function() {
            $.getJSON("AddPlanTempSaveSCXMGK.action", 
                {
                    "tdfkfaBasicScxmgk.yjjsyd": $("#yjjsyd").val(),
                    "tdfkfaBasicScxmgk.phtdmj": $("#phtdmj").val(),
                    "tdfkfaBasicScxmgk.zyzcl": $("#zyzcl").val(),
                    "tdfkfaBasicScxmgk.scnl": $("#scnl").val(),
                    "tdfkfaBasicScxmgk.startYear": $("#startYear").val(),
                    "tdfkfaBasicScxmgk.endYear": $("#endYear").val()
                },
                function(data) {
                    if (data.tempSaveStatus == "success") {
                        $(parent.LeftFrame.document).contents().find("#tempDataSaver").val("success");
                    } else if (data.tempSaveStatus == "failed") {
                        $(parent.LeftFrame.document).contents().find("#tempDataSaver").val("failed");
                    }
                }
            );
        });
    });
    function loadTempSavedData() {
        $.getJSON("AddPlanTempLoadSCXMGK.action", 
            function(data) {
                if (data.tdfkfaBasicScxmgk != null) {
                    $("#yjjsyd").val(data.tdfkfaBasicScxmgk.yjjsyd);
                    $("#phtdmj").val(data.tdfkfaBasicScxmgk.phtdmj);
                    $("#zyzcl").val(data.tdfkfaBasicScxmgk.zyzcl);
                    $("#scnl").val(data.tdfkfaBasicScxmgk.scnl);
                    $("#startYear").val(data.tdfkfaBasicScxmgk.startYear);
                    $("#endYear").val(data.tdfkfaBasicScxmgk.endYear);
                }

                watchDataEdited();
            }
        );
    }
    function watchDataEdited() {
    	$("input[type='text'],input[type='radio'],input[type='checkbox']").change(function() {
            $(parent.LeftFrame.document).contents().find("#dataEditWatcher").val("changed");
            $(parent.LeftFrame.document).contents().find("#tempDataSaver").val("");
        });
    }
</script>
<style type="text/css">
<!--
.style2 {
	font-size: 36px;
	font-weight: bold;
}
-->
</style>
</head>
<body>
<table cellspacing="0" cellpadding="0" width="100%" border="0">
    <tr>
        <td width="20%" colspan="2"><div align="center" class="style2">生产项目概况</div>
        <hr></hr></td>
    </tr>
    <tr>
        <td width="30%" height="25" align="right"><span style="color: red;">请选择面积单位：</span></td>
        <td><input type="radio" name="produceSQUnit" id="idProduceMU" value="mu" /><label for="idProduceMU">亩</label><input type="radio" name="produceSQUnit" id="idProduceHA" value="ha" /><label for="idProduceHA">公顷</label><input type="radio" name="produceSQUnit" id="idProduceSQM" value="sq.m." /><label for="idProduceSQM">平方米</label></td>
    </tr>
    <tr>
        <td width="30%" height="25" align="right">永久建设用地：</td>
        <td><input type="text" id="yjjsyd"/></td>
    </tr>
    <tr>
        <td width="30%" height="25" align="right">破坏土地面积：</td>
        <td><input type="text" id="phtdmj"/></td>
    </tr>
    <tr>
        <td width="30%" height="25" align="right"><span style="color: red;">请选择质量单位：</span></td>
        <td><input type="radio" name="produceQUUnit" id="idProduceTON" value="ton" /><label for="idProduceTON">吨</label><input type="radio" name="produceQUUnit" id="idProduceMTON" value="mton" /><label for="idProduceMTON">万吨</label></td>
    </tr>
    <tr>
        <td width="30%" height="25" align="right">资源总储量：</td>
        <td><input type="text" id="zyzcl"/></td>
    </tr>
    <tr>
        <td height="25" width="30%" align="right">生产能力：</td>
        <td><input type="text" id="scnl"/></td>
    </tr>
    <tr>
        <td height="25" width="30%" align="right">生产起始年限：</td>
        <td><input type="text" value="" class="date-text" id="startYear"/></td>
    </tr>
    <tr>
        <td height="25" width="30%" align="right">生产结束年限：</td>
        <td><input type="text" value="" class="date-text" id="endYear"/></td>
    </tr>
    <tr>
        <td width="20%" height="25"><div align="right"><input type="button" id="tempSave" value="暂存" /></div></td>
        <td>&nbsp;</td>
    </tr>
</table>
</body>
</html>